package com.woniuxy.shiro.Utils;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.shiro.authc.AuthenticationToken;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Description: 等同于UsernamePasswordToken 都实现了AuthenticationToken
 * @Author 18452
 * @Date 2021/5/7 19:07
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MyJWT implements AuthenticationToken {

    private String token;

    @Override
    public Object getPrincipal() {
        return token;
    }

    @Override
    public Object getCredentials() {
        return token;
    }
}
